package com.xxx.mall.mapper;

import com.xxx.mall.dto.SkuDTO;
import com.xxx.mall.model.Sku;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxx.mall.vo.SkuVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * sku信息 Mapper 接口
 * </p>
 *
 * @author 邢晨旭
 * @since 2023-11-24
 */
public interface SkuMapper extends BaseMapper<Sku> {

    void saveBatch(@Param("skuList") List<SkuDTO> skuList);

    List<SkuVO> queryListBySpuId(@Param("spuId") Long id);

    void updateBatch(@Param("list") List<SkuDTO> updateSkus);

    void removeBatchIds(@Param("list") List<Long> skuIdsDb);

    void removeBySpuId(Long id);
}
